package org.yoki.tool.core.bean;

import lombok.Data;

import java.util.*;

/**
 * Created by SKY on 2017/7/23.
 */
@Data
public class BeanTemplateBean {

    private String projName ;

    private String projVersion ;

    private String mavenName ;

    /**
     * 包名称
     */
    private String groupId;

    /**
     * 模块名称
     */
    private String moduleName ;

    /**
     * 访问权限 private、default、protected、public
     */
    private String authority;

    /**
     * 类名称
     */
    private String className;

    /**
     * 包导入
     */
    private Set<String> importSet = new LinkedHashSet<>();
    /**
     * 字段集合
     */
    private Set<FieldTemplateBean> fieldSet = new LinkedHashSet<>();

    private TableTemplateBean table ;




    public Boolean addImport(String i) {
        return importSet.add(i);
    }

    public Boolean removeImport(String i) {
        return importSet.remove(i);
    }


    public Boolean addField(FieldTemplateBean f) {
        return fieldSet.add(f);
    }

    public Boolean removeField(FieldTemplateBean f) {
        return fieldSet.remove(f);
    }
}
